# Created by: Koop Mast <kwm@FreeBSD.org>
# $FreeBSD: head/sysutils/zeitgeist/Makefile 353001 2014-05-05 12:58:03Z kwm $

PORTNAME=	zeitgeist20
PORTVERSION=	0.9.14
CATEGORIES=	sysutils
MASTER_SITES=	https://launchpadlibrarian.net/142715077/ \
	https://launchpad.net/zeitgeist/${PORTVERSION:R}/${PORTVERSION}/+download/
DISTNAME=	zeitgeist-${PORTVERSION}

MAINTAINER=	kwm@FreeBSD.org
COMMENT=	Event logging framework

LICENSE=	GPLv2 LGPL21
LICENSE_COMB=	multi

BUILD_DEPENDS=	python:${PORTSDIR}/lang/python \
	valac:${PORTSDIR}/lang/vala \
	dee-tool:${PORTSDIR}/devel/dee \
	rapper:${PORTSDIR}/textproc/raptor2 \
	${PYTHON_PKGNAMEPREFIX}rdflib>=4.1.1:${PORTSDIR}/textproc/py-rdflib
RUN_DEPENDS=	python:${PORTSDIR}/lang/python \
	${PYTHON_PKGNAMEPREFIX}rdflib>=4.1.1:${PORTSDIR}/textproc/py-rdflib \
	${PYTHON_PKGNAMEPREFIX}dbus>=1.1.1:${PORTSDIR}/devel/py-dbus

CONFLICTS=	zeitgeist-0.8.* libzeitgeist-0.3.*

USE_GNOME=	intlhack glib20 introspection:build
USE_PYTHON=	2
GNU_CONFIGURE=	yes
USE_SQLITE=	yes
USES=		gmake pathfix pkgconfig libtool tar:xz shebangfix
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

SHEBANG_FILES=	data/ontology2code
python_CMD=	${SETENV} python

OPTIONS_DEFINE=	DATAHUB
OPTIONS_DEFAULT=	DATAHUB
DATAHUB_DESC=	Passive loggers for Zeitgeist

CONFIGURE_ARGS=--disable-fts --disable-telepathy \
	--disable-downloads-monitor

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDATAHUB}
LIB_DEPENDS+=	libjson-glib-1.0.so:${PORTSDIR}/devel/json-glib
USE_GNOME+=	gtk30
CONFIGURE_ARGS+=--enable-datahub
PLIST_SUB+=	DATAHUB=""
.else
CONFIGURE_ARGS+=--disable-datahub
PLIST_SUB+=	DATAHUB="@comment "
.endif

.include <bsd.port.mk>
